package com.powernode.factory.method;

public class Test {
    /**
     * 客户端角色
     * @param args
     */
    public static void main(String[] args) {
        WeaponFactory daggerFactory = Factory.get("DaggerFactory");
        Weapon dagger = daggerFactory.get();
        dagger.attack();

        WeaponFactory gunFactory = Factory.get("GunFactory");
        Weapon gun = gunFactory.get();
        gun.attack();
    }
}
